/* --- Fun Stuff Navigation Section Dark Theme --- */
#funstuff-nav .card {
    background: linear-gradient(120deg, #23272f 80%, #343a40 100%);
    color: #f8fafc;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.18);
}
#funstuff-nav h2 {
    color: #43e97b;
    font-weight: 700;
}
#funstuff-nav .btn-gradient-blue,
#funstuff-nav .btn-gradient-green,
#funstuff-nav .btn-gradient-red {
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
}
#funstuff-nav .btn-gradient-blue {
    background: linear-gradient(90deg, #396afc 0%, #2948ff 100%);
}
#funstuff-nav .btn-gradient-green {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}
#funstuff-nav .btn-gradient-red {
    background: linear-gradient(90deg, #ff5858 0%, #f09819 100%);
}
#funstuff-nav .btn-gradient-blue:hover,
#funstuff-nav .btn-gradient-green:hover,
#funstuff-nav .btn-gradient-red:hover {
    filter: brightness(1.08) drop-shadow(0 2px 8px #43e97b22);
    transform: scale(1.04);
    transition: filter 0.2s, transform 0.2s;
}
/* --- Number Guessing Game Card and Elements --- */
.guessing-game-card {
    max-width: 480px;
    width: 100%;
    background: linear-gradient(120deg, #f4f6fb 70%, #e3eafc 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.12);
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    transition: box-shadow 0.3s, transform 0.3s;
}

.guessing-game-title {
    color: #1a2537;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2.1rem;
}

.guessing-game-label {
    color: #34495e;
    font-weight: 600;
}

.guessing-game-select {
    border: 0;
    box-shadow: 0 1px 4px rgba(44,62,80,0.07);
    background: #f8fafc;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.guessing-game-input {
    border: 0;
    box-shadow: 0 1px 4px rgba(44,62,80,0.07);
    background: #f8fafc;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.guessing-game-btn {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
}

.guessing-game-message {
    font-size: 1.1rem;
}

.guessing-game-tries {
    color: #1a2537;
    font-size: 1.1rem;
}

.guessing-game-history-title {
    color: #1a2537;
    font-weight: 600;
}
/* --- Number Guessing Game Interactive Section Hover Effects --- */
.guessing-game-card .form-select:hover,
.guessing-game-card .form-control:hover {
    box-shadow: 0 0 0 2px #396afc33;
    border-color: #396afc;
    background: #f4f6fb;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.guessing-game-card .btn-gradient-green:hover,
.guessing-game-card .btn-gradient-blue:hover,
.guessing-game-card .btn-gradient-red:hover {
    filter: brightness(1.08) drop-shadow(0 2px 8px #396afc22);
    transform: scale(1.04);
    transition: filter 0.2s, transform 0.2s;
}

.guessing-game-card .btn-gradient-green:active,
.guessing-game-card .btn-gradient-blue:active,
.guessing-game-card .btn-gradient-red:active {
    filter: brightness(0.98);
    transform: scale(0.98);
}
/* --- Memory Matching Game Styles --- */
.memory-game-card{
    background: linear-gradient(120deg,#1f2630 60%, #23282f 100%);
    color: #fff;
    border-radius: 12px;
}
#memoryStartBtn {
  background: linear-gradient(to right, #34d058, #28a745);
  color: white;
  transition: all 0.2s ease;
}

#memoryStartBtn:hover {
  background: linear-gradient(to right, #28a745, #218838);
}

#memoryStartBtn:active {
  background: linear-gradient(to right, #1e7e34, #155724); /* darker green when pressed */
  transform: scale(0.95); /* gives a "pressed down" effect */
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Larger screens → more columns, smaller cards */
@media (min-width: 992px) {
  .memory-grid {
    grid-template-columns: repeat(5, 1fr); /* 6 columns on desktops */
  }
}

/* Smaller screens → fewer columns, bigger cards for touch */
@media (max-width: 600px) {
  .memory-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on phones */
  }
}
.memory-card{
    perspective: 1000px;
    cursor: pointer;
}
.card-inner {
  position: relative;
  width: 100%;
  padding-top: 100%; /* keeps square ratio */
  
  /* 3D transform setup */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d; /* Chrome/Safari */
  -ms-transform-style: preserve-3d;     /* Edge/IE */
  
  /* animation */
  transition: transform 0.5s;
  will-change: transform; /* helps Edge optimize rendering */
}
.memory-card .card-inner .card-front,
.memory-card .card-inner .card-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;

  /* critical for flip animation */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* Chrome/Safari */
  -ms-backface-visibility: hidden;     /* Edge/IE */

  font-size: 1.8rem;
}

.memory-card .card-inner .card-front{
    background: linear-gradient(180deg,#2b3038,#1f2630);
    color: #fff;
}
.memory-card .card-inner .card-back{
    background: linear-gradient(180deg,#fff,#f1f3f7);
    transform: rotateY(180deg);
    color: #222;
}


.memory-card.flipped .card-inner{ transform: rotateY(180deg); }
.memory-card.matched .card-inner{ box-shadow: 0 6px 18px rgba(67,160,71,0.12); }

@media (max-width: 768px){
    .memory-grid{ grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 480px){
    .memory-grid{ grid-template-columns: repeat(2,1fr); gap:8px; }
}
/* --- Weather Forecast Form Styles --- */
.weather-card{
    background: linear-gradient(120deg, #e3eafc 70%, #f4f6fb 100%);
    border-radius: 16px;
    border: none;
}
.weather-label{
    color: #34495e;
    font-weight: 600;
}
.weather-input{
    border: 0;
    box-shadow: 0 1px 4px rgba(44,62,80,0.07);
    background: #f8fafc;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.weather-input:hover,
.weather-input:focus{
    box-shadow: 0 0 0 2px #396afc33;
    border-color: #396afc;
}
.weather-cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.weather-card-item{
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(67,233,123,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}
.weather-card-item.weather-card-today{
    background: linear-gradient(135deg, #396afc 0%, #2948ff 100%);
    box-shadow: 0 4px 12px rgba(41,72,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
}
.weather-card-item:hover{
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(67,233,123,0.25);
}
.weather-card-item.weather-card-today:hover{
    box-shadow: 0 6px 16px rgba(41,72,255,0.25);
}
.weather-card-item h5{
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}
.weather-icon{
    width: 48px;
    height: 48px;
    margin: 8px auto;
}
.weather-condition{
    margin: 8px 0;
    font-weight: 600;
    font-size: 0.9rem;
}
.weather-temps{
    display: flex;
    justify-content: space-around;
    margin: 8px 0;
    font-size: 0.85rem;
}
.temp-high, .temp-low{
    font-weight: 600;
}
.weather-details{
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.95;
}
@media (max-width: 768px){
    .weather-cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
    .weather-cards{ grid-template-columns: 1fr; }
}
.title-section {
    text-align: center;
    justify-content: center;
}

header.border.rounded {
    max-width: 800px;
    margin: 20px auto;
    padding: 1rem;
}

.navbar-nav {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 40px;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link {
    color: white;
}

.navbar .container-fluid {
    padding-top: 20px;
}

.nav-link:hover {
    color: #000000;
}

/* Show dropdown on hover instead of click */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-item:hover {
    background-color: #4e54c8;
    color: white;
}

/* ---------- Intro Section ---------- */

.custom-Intro-container {
    padding-top: 50px;
}

.custom-intro-row {
    display: flex;
    align-items: stretch;
}

.custom-intro-row > .col-sm-8,
.custom-intro-row > .col-sm-4 {
    display: flex;
    flex-direction: column;
}

.custom-intro-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: large;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

.intro-img {
    max-height: 400px;
    height: auto;
    object-fit: cover;
}

.custom-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    padding: 1rem;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.custom-link:hover {
    background-color: rgba(255, 255, 255, 0.37);
    transition: background-color 0.3s ease;
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.border.rounded {
    padding: 20px;
}

.custom-Intro-container h1 {
    margin-bottom: 2rem;
}

.custom-Projects-container {
    padding-top: 80px;
}

.custom-Projects-container h1 {
    margin-bottom: 2rem;
}

.custom-link h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.custom-link p {
    margin: 0;
}

.custom-link .carousel-inner img {
    height: 400px;
    width: 100%;
    object-fit: cover;
}

#software-projects {
    text-align: center;
}

html {
    scroll-behavior: smooth;
}

.Software_Header {
    text-align: center;
}

#sailbot-title {
    text-align: center;
}

.Sailbot {
    max-width: 900px;
    margin: 0 auto;
}

.key-contributions ul {
    margin-top: 20px;
    list-style-type: disc;
    list-style-position: outside;
    text-align: left;
}

.key-contributions li {
    margin-top: 10px;
}

.key-contributions li p.text-center {
    margin-top: 0.3em;
    font-size: 0.95em;
    font-style: italic;
}

.sailbot-img {
    max-height: 300px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.skills-marquee {
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid #ddddddb9;
    border-radius: 10px;
    padding: 10px 0;
    background: #14111156;
}

.skills-track {
    display: inline-block;
    animation: scroll 10s linear infinite;
}

.skill-logo {
    height: 60px;
    margin: 0 20px;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.small-height {
    height: 500px;
}

.After_Sailbot_Intro ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.5em;
    margin-left: 0;
}

.After_Sailbot_Intro ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.5em;
    margin-left: 0;
}

.After_Sailbot_Intro h3 {
    text-align: left;
    margin-bottom: 1rem;
}

.After_Sailbot_Intro p {
    text-align: left; /* paragraph aligned with bullets */
    margin-bottom: 1rem;
}

.After_Sailbot_Intro ul {
    list-style-type: disc;
    list-style-position: inside; /* bullets aligned with text */
    padding-left: 1.5rem;
}

.After_Sailbot_Intro img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

/* Bullet points nicely aligned with text */
.aligned-bullets {
    text-align: left;
    list-style-type: disc;
    list-style-position: inside; /* bullets inside the text block */
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.main-paragraph {
    max-width: 700px; /* max width in pixels */
    margin: 0 auto;   /* center horizontally */
    text-align: center;
}


/* Cellular Simulation Styling */
.Cellular {
    max-width: 900px;
    margin: 0 auto;
}

.Cellular ul {
    margin-top: 20px;
    list-style-type: disc;
    list-style-position: outside;
    text-align: left;
}

.cellular-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    margin: 0 auto;
}

.cellular-subheading code {
    display: block;
    text-align: left;
}

.cellular-details pre {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.4;
}

code.java {
    display: block;
    color: #fff;
    padding: 15px;
    white-space: pre;
    overflow-x: auto;
    text-align: left;
    margin-bottom: 20px;
}

/* Manufacturing Specific Styling */
.RC-img {
    max-height: 500px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.RC-Sub1-img {
    max-height: 140px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.RC-dropdown-img {
    max-height: 300px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.rc-side-img {
    max-height: 300px;
    max-width: 300px;
}

.rc-side-thermo-process-img {
    max-height: 300px;
    max-width: 500px;
}

.rc-side-shell-design-printed-img {
    max-height: 270px;
    max-width: 350px;
}

.rc-side-shell-design-cad-img {
    max-height: 270px;
    max-width: 350px;
}